/*
  Part of the MasterTool3D project - http://code.google.com/p/master-tool-3d

  Copyright (c) 2011 Ingo Pueschl

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Lesser General Public
  License as published by the Free Software Foundation, version 2.1.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Lesser General Public License for more details.

  You should have received a copy of the GNU Lesser General
  Public License along with this library; if not, write to the
  Free Software Foundation, Inc., 59 Temple Place, Suite 330,
  Boston, MA  02111-1307  USA
*/

package techjit.gfx.util.geo;

public class Dimensions {

	// FIELDS
	private float width;
	private float height;
	private float depth;

	// CONSTRUCTORS
	public Dimensions(Dimensions dimensions) {
		this(dimensions.width, dimensions.height, dimensions.depth);
	}

	public Dimensions(float floatValue) {
		this(floatValue, floatValue, floatValue);
	}

	public Dimensions(float width, float height, float depth) {
		this.width = width;
		this.height = height;
		this.depth = depth;
	}

	// METHODS
	public void change(Dimensions dimensions) {
		width = dimensions.width;
		height = dimensions.height;
		depth = dimensions.depth;
	}

	public boolean equals(Dimensions dimensions) {
		if (width == dimensions.width && height == dimensions.height
				&& depth == dimensions.depth) {
			return true;
		} else {
			return false;
		}
	}

	public float getDepth() {
		return depth;
	}

	public float getHeight() {
		return height;
	}

	public float getWidth() {
		return width;
	}

	@Override
	public String toString() {
		return width + "|" + height + "|" + depth;
	}

}
